package com.auth.service;

import com.auth.pojo.User;
import org.springframework.mobile.device.Device;

/**
 * Created by Administrator on 2017/7/21 0021.
 * 授权接口
 */
public interface AuthService {
    /**
     * 用户授权注册
     * @param user
     * @return
     */
    User register(User user);

    /**
     * 用户登录
     * @param username
     * @param password
     * @return
     */
    String login(String username,String password,Device device);

    /**
     * 刷新Token
     * @param oldToken
     * @return
     */
    String refresh(String oldToken);
}
